<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
</head>
<body>
<ul>
	<li class="item">1</li>
	<li class="item">2</li>
	<li>3</li>
	<li id = "li">4</li>
	<li>5</li>
</ul>
<script type="text/javascript">
	//默认只选中一个querySelector("css选择器") 默认获取第一个元素
	let item = document.querySelector("ul .item")
	console.log(item)
	//querySelectorAll("css选择器") 获取满足所有条件的元素 返回伪数组
	let items = document.querySelectorAll("ul .item") //[li.item , li.item]
	console.log(items)

	let li = document.querySelector('#li')
	console.log(li)
</script>
</body>
</html>